<?php
require "model/new.model.php";
session_start();
if(isset($_SESSION['username'])){
$id = $_GET["id"];
$tr = newList::delenew($id);

if($tr){   
    echo "<script>alert('删除成功');parent.location.href='./new.php';</script>";
}else{
   
     echo "<script>alert('删除失败');parent.location.href='./new.php';</script>";
}
}else{
    header("Location:../log.php");
    exit();
}